package com.wondertek.poms.service.vo;

import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.groups.Default;
import java.util.Date;

@Data
public class ProductVo {

    private Long id;

    @NotBlank(message = "计费名不能为空", groups = {Default.class})
    @Length(message = "计费名长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String name;

    @NotBlank(message = "计费id不能为空", groups = {Default.class})
    @Length(message = "计费id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String productID;

    @NotBlank(message = "计费模式不能为空", groups = {Default.class})
    @Length(message = "计费模式长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String chargeMode;

    @NotBlank(message = "计费价格不能为空", groups = {Default.class})
    @Length(message = "计费价格长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    @Pattern(regexp="[0-9]*", message="计费只能为数字" ,groups = {Default.class, GroupType.Update.class, GroupType.Delete.class})
    private String price;

    @Length(message = "描述长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String description;

    private Long status;

}
